{% extends "_base.html" %}
{% block title %}充值页面{% endblock %}
{% block script %}
<script type="text/javascript">
    $(function(){
        // 按钮风格
        $(".confirm-submit").button();
    })
</script>
{% endblock %}
{% block content %}
    <div class="confirm-content">
        <form action='/charge/order' method='post'>
            <div class="confirm-message">
                <label>输入充值金额并确认</label>
            </div>
            <input type='hidden' name='token' value='{{_session['token']}}' /><br/>
            <input type='text' name='amount' value='' />元<br/>
            <input class="confirm-submit" type='submit' value='确认' /><br/>
        </form>
    </div>
    <table class="confirm-table">
        <caption>未支付的充值订单列表</caption>
        <tr>
            <th>支付号</th>
            <th>操作</th>
        </tr>
        {% for charge_info in charge_infos %}
        <tr>
            <td>
                {{charge_info['pay_sn']}}
            </td>
            <td>
                <a href="{{pay_user_url}}?pay_sn={{charge_info['pay_sn']}}" target="_blank">支付</a>
                <a href="/charge/confirm?pay_sn={{charge_info['pay_sn']}}">确认</a>
            </td>
        </tr>
        {% endfor %}
    </table>
{% endblock %}
